﻿#region

using System;
using HouseHoldBudget.Framework.Mvc;

#endregion

namespace HouseHoldBudget.Models.Expenses
{
    public class ExpenseTypesModel : MvcEntityModelBase, IComparable
    {
        #region Instance Properties

        public string ExpenseTypeName { get; set; }

        #endregion

        public int CompareTo(object obj)
        {
            if (obj == null) return 1;
            ExpenseTypesModel model = obj as ExpenseTypesModel;
            if (model != null) 
            {
                return String.CompareOrdinal(ExpenseTypeName, model.ExpenseTypeName);
            }
            throw new ArgumentException("Object is not a ExpenseTypesModel");
        }
    }
}